package com.mindcraft.shop.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mindcraft.shop.po.Category;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;


@Data
public class CommunityVo {


    private Integer id;

    private String userId;

    private String avartarUrl;

    private Integer categoryId;

    private String label;


    @NotBlank(message = "内容不能为空")
    private String content;



    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


    // 需要查询封装
    private Integer commentCount;

    private Integer likeCount;

    private String username;


    private List<String> imgList;

}
